<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="moduleList" />
<script type="text/javascript">
$(document).ready(function() {
	$('#btnExport').click(function(){
		window.open('${contextPath}/biz/statement/supplies/export/list?'+$('#invoiceForm').serialize(),'_blank');
	});
	var param = {
	        language:  'zh-CN',
	        weekStart: 1,
	        todayBtn:  1,
			autoclose: 1,
			todayHighlight: 1,
			startView: 2,
			minView: 2,
			forceParse: 0,
			format: 'yyyy-mm-dd'
	    };
    $('#billingDate').datetimepicker(param);
});
</script>
</head>
<body>
<form:form name="listForm" modelAttribute="statementExpInvoice" method="post" class="form-inline" role="form">
	    <input type="hidden" name="deleteIds" >
		<ol class="breadcrumb map_1">
			<li><a href="${contextPath}/index">首页</a></li>
			<li><a href="${contextPath}/statement/stm/prepaid/list?navId=${navId}">结算对账</a></li>
			<li class="active">费用发票</li>
		</ol>
		<div class="o-l-search-builder f_1">
	         <div id="statement-search-builder" class="collapse" style="height:auto;">
	             <div class="f_2">
	                 <div class="form-group col-sm-6">
	                      <label for="inputEmail3" class="col-sm-3 control-label f_4">开票日期：</label>
	                      <div class="col-sm-9 f_6">
	                        <div class="input-group date o-a-form-date" data-date="" data-date-format="yyyy-mm-dd">
	                            <input class="form-control f_13" name="billingDate" value="<fmt:formatDate value="${statementExpInvoice.billingDate}" pattern="yyyy-MM-dd"/>" type="text" readonly/>
	                            <span class="input-group-addon f_time"><i class="glyphicon glyphicon-remove"></i></span>
	                            <span class="input-group-addon f_time"><span class="glyphicon glyphicon-calendar"></span></span>
	                        </div>
	                      </div>
	                  </div>
	             </div> 
	         </div>
	         <div class="f_8">
	              <div class="f_2">
	                  <div class="col-sm-8 f_6">
	                       <form:input id="supplierNo" path="supplierNo" class="f_5" placeholder="供应商编号"/>
	                  </div>
	                  <button type="submit" class="btn btn-warning btn_1">查&nbsp;询</button>
	             </div>
	         </div>
	         <div class="o-l-chevron-down"><a href="#" class="btn btn-default" data-toggle="collapse" data-target="#statement-search-builder" id="chevronDownBtn" role="button"><span id="glyphiconspan" class="glyphicon glyphicon-chevron-down"></span></a>
	         </div>
	     </div>
		<tags:message content="${message}"/>
		<div class="o-l-search-builder f_9">
			<table class="table table-striped table-hover o-l-table table-bordered" id="table1">
				<thead class="t_1">
					<tr>
						<th>来源单号</th>
						<th>供应商编号</th>
						<th>供应商名称</th>
						<th>开票日期</th>
						<th>开票总额</th>
						<th>国税总额</th>
						<th>地税总额</th>
						<th>开票类型</th>
						<th>是否确认</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${page.list}" var="statementExpInvoice">
						<tr
							data-herf="${contextPath}/biz/statement/exp/${statementExpInvoice.id}/detail"
							data-target="_self">
							<td>${statementExpInvoice.billNo }</td>
							<td>${statementExpInvoice.supplierNo }</td>
							<td>${statementExpInvoice.supplierName }</td>
							<td><fmt:formatDate value="${statementExpInvoice.billingDate}" pattern="yyyy-MM-dd"/></td>
							<td>${statementExpInvoice.invoiceAmount }</td>
							<td>${statementExpInvoice.irsTax }</td>
							<td>${statementExpInvoice.localTax }</td>
							<td><ossp:value dictType="INVOICETYPE" key="${statementExpInvoice.billType}"></ossp:value></td>
							<td><ossp:value dictType="YESORNO" key="${statementExpInvoice.isConfirmed}"></ossp:value></td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
        </div>
		<pager:pager pageSize="${page.pageSize}" pageNo="${page.pageNo}" url="" total="${page.total}"/>
		<script type="text/javascript" src="${staticPath}/js/list.js"></script>
  </form:form>
</body>
</html>